package com.perye.dokit.entity;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;

/**
* @author libo
* @date 2022-03-14
*/
@Entity
@Data
@Table(name="we_wedding_style")
public class WeWeddingStyle implements Serializable {


    @Id
    @Column(name = "id")
    private String id;


    @Column(name = "type_id")
    private String typeId;


    @Column(name = "name")
    private String name;


    @Column(name = "price")
    private String price;


    @Column(name = "deposit")
    private String deposit;


    @Column(name = "service_details")
    private String serviceDetails;


    @Column(name = "price_recommend")
    private Integer priceRecommend;


    @Column(name = "work_recommend")
    private Integer workRecommend;


    @Column(name = "is_open")
    private Integer isOpen;


    @Column(name = "create_time")
    private Timestamp createTime;


    @Column(name = "update_time")
    private Timestamp updateTime;


    @Column(name = "is_delete")
    private Integer isDelete;

    public void copy(WeWeddingStyle source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
